-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System tests should cleanup after themselves #2216
Conversation
Signed-off-by: ATorrise <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2216 +/- ##
========================================
Coverage 91.08% 91.08%
========================================
Files 628 628
Lines 17896 17896
Branches 3847 3741 -106
========================================
Hits 16300 16300
Misses 1595 1595
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: ATorrise <[email protected]>
__tests__/__packages__/cli-test-utils/src/environment/TestEnvironment.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
0f61785
to
4f059e6
Compare
…iles from permanent residency, ,instead creating them from scratch everytime Signed-off-by: ATorrise <[email protected]>
…as matching for this test. also took a while to identify which shell script was populating 2 jobs Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
packages/cli/__tests__/zosjobs/__system__/download/cli.zos-jobs.download.output.system.test.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
…ests for cliZosJobs Signed-off-by: ATorrise <[email protected]>
packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts
Fixed
Show resolved
Hide resolved
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Co-authored-by: ATorrise <[email protected]> Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
packages/cli/__tests__/zosuss/__system__/issue/cli.issue.ssh.system.test.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/workflows/__system__/create/cli.workflows.create.common.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/workflows/__system__/create/cli.workflows.create.common.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/workflows/__system__/create/cli.workflows.create.common.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/workflows/__system__/create/cli.workflows.create.common.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/workflows/__system__/create/cli.workflows.create.common.system.test.ts
Fixed
Show fixed
Hide fixed
packages/zosfiles/__tests__/__system__/methods/delete/DeleteUSSFile.system.test.ts
Fixed
Show fixed
Hide fixed
packages/zosfiles/__tests__/__system__/methods/delete/DeleteUSSFile.system.test.ts
Fixed
Show fixed
Hide fixed
packages/zosfiles/__tests__/__system__/methods/delete/DeleteUSSFile.system.test.ts
Fixed
Show fixed
Hide fixed
packages/zosfiles/__tests__/__system__/methods/delete/DeleteUSSFile.system.test.ts
Fixed
Show fixed
Hide fixed
packages/zosfiles/__tests__/__system__/methods/delete/DeleteUSSFile.system.test.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: Timothy Johnson <[email protected]>
0faa40b
to
336d3e4
Compare
Quality Gate passedIssues Measures |
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and the tests seem to pass. Some jobs are removed by job name and others are removed by job id. It would be nice if it was consistent, but since removing them by name can remove large quantities at once, and the PR seems to use that behavior, I think it should be fine to leave this way. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the great work on this! 🙏
LGTM! 😋
What It Does
This PR enhances the test framework to simplify and automate the cleanup of test resources, such as datasets, USS files, jobs, and local files. The
TestEnvironment
,ITestEnvironment
, andTestUtils
classes have been updated to track and delete resources after system tests, preventing any leftover artifacts on the mainframe or local filesystem.How to Test : Run System Tests
Review Checklist
I certify that I have:
Additional Comments
zowe-cli\packages\zosjobs\__tests__\__system__\MonitorJobs.system.test.ts
only had minor indentation changes and was left intact as it leaves no jobs behind on the mainframe.